package logic.regulardevices;

public class HeatIn extends RegularDevice{


	private boolean on;

	public HeatIn() {
		id = "heatin";
	}
	@Override
	public String receiveAndRespond(String cmd) {
		if(cmd.equals("on")) {
			on=true;
			return "on";
		} else if(cmd.equals("off")) {
			on=false;
			return "off";
		} else if(cmd.equals("check")) { //checks the firealarms state.
			return check();
		}
		return invalidCommand();
	}

	@Override
	public String check() {
		if(on)
			return "on";
		return"off";
	}

	@Override
	public String test() {
		// TODO Auto-generated method stub
		return null;
	}



}
